package com.smedi.ismedi.progress.core.domain.repository;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.progress.core.application.command.*;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.*;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.EngineeringWeekMonthReportEntity;

import java.time.LocalDate;
import java.util.List;

/**
 *
 *
 * @author pengyan
 * @date 2022/11/22 10:27
 */
public interface EngineeringrReportRepository {

    Boolean engineeringMonthReportCreateTask();

    /**
    * 工程报告列表pc 查询
    * @param engineeringReportQuery
    * @return Page<EngineeringWeekMonthReport>
    * @date 2022/11/24 14:04
    */
    Page<EngineeringWeekMonthReport> getEngineeringReportListPC(EngineeringReportQuery engineeringReportQuery,String messageNotifyProjectEpcManagerRole,String messageNotifyProjectManagerRole);

    /**
     * 工程报告列表app 查询
     * @param engineeringReportQuery
     * @return Page<EngineeringWeekMonthReport>
     * @date 2022/11/24 14:04
     */
    Page<EngineeringWeekMonthReport> getEngineeringReportListAPP(EngineeringReportQuery engineeringReportQuery, String messageNotifyProjectEpcManagerRole);

    /**
    * 工程周月报详情
    * @param engineeringReportDetailQuery
    * @return com.smedi.ismedi.progress.core.domain.aggregatemodel.EngineeringReportDetail
    * @date 2022/11/25 14:46
    */
    EngineeringReportDetail getEngineeringReportDetail(EngineeringReportDetailQuery engineeringReportDetailQuery);

    /**
     * 新增周报
     * @return
     */
    Boolean engineeringWeekReportCreateTask();

    /**
     * 工程报告  查询 单一
     * @param engineeringReportOneQuery
     * @return
     */
    EngineeringReportOneQuery getEngineeringrReportOne(EngineeringReportOneQuery engineeringReportOneQuery);

    /**
     * 更新主表状态
     * @param engineerReport
     */
    void updateEngineeringrReport(EngineeringReportOneQuery engineerReport);

    /**
     * 工程报告  保存草稿与发布
     * @param engineeringSaveAndDraft
     * @return
     */
    EngineeringWeekMonthReportSave engineeringWeekMonthSaveAndDraft(EngineeringWeekMonthReportSave engineeringSaveAndDraft);

    /**
    *  找所有未发布的工程周报
    * @param localDate
    * @param weekType
    * @param projectId
    * @param id
    * @param weekMonthReleaseStatus
    * @return java.lang.Integer
    * @date 2022/12/7 10:09
    */
    Integer findWeekReport(LocalDate localDate, int weekType, Long projectId, Long id, int weekMonthReleaseStatus);

    /**
    * 找所有未发布的工程月报
    * @param localDate
    * @param projectId
    * @param weekMonthReleaseStatus
    * @return java.lang.Integer
    * @date 2022/12/7 10:41
    */
    Integer findMonthReport(LocalDate localDate, Long projectId,int monthType, int weekMonthReleaseStatus);

    List<EngineeringWeekMonthReportEntity> selectAllNoty(LocalDate localDate, int weekType, int weekMonthReleaseStatus);
}
